package com.pxmeta.circle.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pxmeta.circle.entity.vo.ParentCircleVO;
import com.pxmeta.common.core.domain.BaseEntity;
import com.pxmeta.user.entity.User;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * 圈子对象 kt_cricle
 *
 * @author wcl
 * @date 2022-04-17
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("kt_circle")
public class Circle extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /** 名称 */
    private String name;

    /** 热度 */
    private Long hot;

    /**
     * 1学生，2职业
     */
    @ApiModelProperty("类型 1学生、2职业、3游戏、4音乐、5自定义")
    private Integer type;

    @ApiModelProperty("圈子头像")
    private String avatar;

    @ApiModelProperty("背景图片")
    private String bgUrl;

    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty(value = "隐私设置：1公开，2私密")
    private Integer privacyType;

    @ApiModelProperty(value = "是否开启私密保护模式: 1开启，0关闭")
    private Integer isPrivate;

    @ApiModelProperty(value = "是否是系统圈子")
    private Integer isSystem;

    @ApiModelProperty(value = "状态，1审核通过，0审核中，-1审核不通过")
    private Integer status;

    @ApiModelProperty(value = "分享数")
    private Integer shareCount;


    @TableField(exist = false)
    @ApiModelProperty(value = "是否加入")
    private Boolean isJoin = false;

    @ApiModelProperty("用户数")
    private Long userCount;

    @ApiModelProperty(value = "是否有未读消息")
    @TableField(exist = false)
    private Boolean isRead;

    @ApiModelProperty("管理员列表")
    @TableField(exist = false)
    private List<User> adminUsers = new ArrayList<>();

    @ApiModelProperty("父圈子")
    @TableField(exist = false)
    private ParentCircleVO parentCircle;

}
